﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Main</title>
    <link href="@Url.Content("~/Plugins/layui/css/layui.css")" rel="stylesheet" media="all" />
    <link href="@Url.Content("~/Plugins/font-awesome/css/font-awesome.min.css")" rel="stylesheet" media="all" />
</head>
<body>
    <div>
        <blockquote class="layui-elem-quote">引用区域的文字</blockquote>
        <table class="layui-table" lay-even>
            <thead>
                <tr>
                    <th>名称</th>
                    <th>权限</th>
                    <th><input type="checkbox" /></th>
                </tr>
            </thead>
            <tbody>
                @for (int i = 0; i < 20; i++)
                {
                    <tr>
                        <td>内容</td>
                        <td>
                            <input type="checkbox" name="like[write]" />查看
                            <input type="checkbox" name="like[read]" />新增
                            <input type="checkbox" name="like[dai]" />修改
                        </td>
                        <td><input type="checkbox" title="全选" /></td>
                    </tr>
                }
            </tbody>
        </table>
        <ul id="demo"></ul>

    </div>

    <script src="@Url.Content("~/Plugins/layui/layui.js")"></script>
    <script type="text/javascript">
        layui.config({
            base: '/Plugins/layui/modules/'
        }).use(['tree', 'form', 'icheck', 'layer'], function () {
            var $ = layui.jquery;

            $('input').iCheck({
                checkboxClass: 'icheckbox_flat-green'
            });
            

            layui.tree({
                elem: '#demo' //传入元素选择器
              , nodes: [{ //节点
                  name: '内容'
                , children: [{
                    name: '新闻资讯',
                    children: [{
                        name: '资讯列表',
                        children: [{
                            name: '查看'
                        }, {
                            name: '新增'
                        }, {
                            name: '修改'
                        }, {
                            name: '删除'
                        }]
                    }, {
                        name: '资讯分类'
                    }]
                }, {
                    name: '资源下载',
                    children: [{
                        name: '资源列表'
                    }, {
                        name: '资源分类'
                    }]
                }]
              }, {
                  name: '会员'
                , children: [{
                    name: '会员管理'
                  , children: [{
                      name: '所有会员'
                  }, {
                      name: '会员级别'
                  }]
                }]
              }]
            });
        });
    </script>
</body>
</html>
